package com.ly.mpayment.persist.entity;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;


/**
 * UpgameRecharge entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name="upgamerecharge"

)

public class UpgameRecharge  implements java.io.Serializable {


    // Fields

     private String upgameuuid;
     private ProvincialInformation provincialInformation;
     private UpShopProduct upShopPro;
     private User user;
     private String upshopordernum;
     private String uppronum;
     private long rechargeamount;
     private Integer upgamerechargenum;
     private long totalamount;
     private String rechargenum;
     private String upnotificationaddress;
     private String upaccounttype;
     private Integer upchargetype;
     private String rechargearea;
     private String rechargeserver;
     private String upgamename;
     private String upuserip;
     private String upgamestatus;
     private Date createtime;
     private long successamount;
     private Set<UpOrderLog> upOrderLogs = new HashSet<UpOrderLog>(0);


    // Constructors

    /** default constructor */
    public UpgameRecharge() {
    }


    /** full constructor */
    public UpgameRecharge(ProvincialInformation provincialInformation, UpShopProduct upShopPro, User user, String upshopordernum, String uppronum, long rechargeamount, Integer upgamerechargenum, long totalamount, String rechargenum, String upnotificationaddress, String upaccounttype, Integer upchargetype, String rechargearea, String rechargeserver, String upgamename, String upuserip, String upgamestatus, Date createtime, long successamount, Set<UpOrderLog> upOrderLogs) {
        this.provincialInformation = provincialInformation;
        this.upShopPro = upShopPro;
        this.user = user;
        this.upshopordernum = upshopordernum;
        this.uppronum = uppronum;
        this.rechargeamount = rechargeamount;
        this.upgamerechargenum = upgamerechargenum;
        this.totalamount = totalamount;
        this.rechargenum = rechargenum;
        this.upnotificationaddress = upnotificationaddress;
        this.upaccounttype = upaccounttype;
        this.upchargetype = upchargetype;
        this.rechargearea = rechargearea;
        this.rechargeserver = rechargeserver;
        this.upgamename = upgamename;
        this.upuserip = upuserip;
        this.upgamestatus = upgamestatus;
        this.createtime = createtime;
        this.successamount = successamount;
        this.upOrderLogs = upOrderLogs;
    }


    // Property accessors
    @Id
    @GeneratedValue(generator = "uuid")
    @GenericGenerator(name = "uuid", strategy = "uuid")
    @Column(name="upgameuuid", unique=true, nullable=false, length=40)

    public String getUpgameuuid() {
        return this.upgameuuid;
    }

    public void setUpgameuuid(String upgameuuid) {
        this.upgameuuid = upgameuuid;
    }
	@ManyToOne(fetch=FetchType.LAZY)
        @JoinColumn(name="provinceuuid")

    public ProvincialInformation getProvincialInformation() {
        return this.provincialInformation;
    }

    public void setProvincialInformation(ProvincialInformation provincialInformation) {
        this.provincialInformation = provincialInformation;
    }
	@ManyToOne(fetch=FetchType.LAZY)
        @JoinColumn(name="upprouuid")

    public UpShopProduct getUpShopPro() {
        return this.upShopPro;
    }

    public void setUpShopPro(UpShopProduct upShopPro) {
        this.upShopPro = upShopPro;
    }
	@ManyToOne(fetch=FetchType.LAZY)
        @JoinColumn(name="useruuid")

    public User getUser() {
        return this.user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    @Column(name="upshopordernum", length=40)

    public String getUpshopordernum() {
        return this.upshopordernum;
    }

    public void setUpshopordernum(String upshopordernum) {
        this.upshopordernum = upshopordernum;
    }

    @Column(name="uppronum", length=20)

    public String getUppronum() {
        return this.uppronum;
    }

    public void setUppronum(String uppronum) {
        this.uppronum = uppronum;
    }

    @Column(name="rechargeamount", precision=28, scale=5)

    public long getRechargeamount() {
        return this.rechargeamount;
    }

    public void setRechargeamount(long rechargeamount) {
        this.rechargeamount = rechargeamount;
    }

    @Column(name="upgamerechargenum")

    public Integer getUpgamerechargenum() {
        return this.upgamerechargenum;
    }

    public void setUpgamerechargenum(Integer upgamerechargenum) {
        this.upgamerechargenum = upgamerechargenum;
    }

    @Column(name="totalamount", precision=28, scale=5)

    public long getTotalamount() {
        return this.totalamount;
    }

    public void setTotalamount(long totalamount) {
        this.totalamount = totalamount;
    }

    @Column(name="rechargenum", length=20)

    public String getRechargenum() {
        return this.rechargenum;
    }

    public void setRechargenum(String rechargenum) {
        this.rechargenum = rechargenum;
    }

    @Column(name="upnotificationaddress", length=200)

    public String getUpnotificationaddress() {
        return this.upnotificationaddress;
    }

    public void setUpnotificationaddress(String upnotificationaddress) {
        this.upnotificationaddress = upnotificationaddress;
    }

    @Column(name="upaccounttype", length=40)

    public String getUpaccounttype() {
        return this.upaccounttype;
    }

    public void setUpaccounttype(String upaccounttype) {
        this.upaccounttype = upaccounttype;
    }

    @Column(name="upchargetype")

    public Integer getUpchargetype() {
        return this.upchargetype;
    }

    public void setUpchargetype(Integer upchargetype) {
        this.upchargetype = upchargetype;
    }

    @Column(name="rechargearea", length=20)

    public String getRechargearea() {
        return this.rechargearea;
    }

    public void setRechargearea(String rechargearea) {
        this.rechargearea = rechargearea;
    }

    @Column(name="rechargeserver", length=40)

    public String getRechargeserver() {
        return this.rechargeserver;
    }

    public void setRechargeserver(String rechargeserver) {
        this.rechargeserver = rechargeserver;
    }

    @Column(name="upgamename", length=40)

    public String getUpgamename() {
        return this.upgamename;
    }

    public void setUpgamename(String upgamename) {
        this.upgamename = upgamename;
    }

    @Column(name="upuserip", length=40)

    public String getUpuserip() {
        return this.upuserip;
    }

    public void setUpuserip(String upuserip) {
        this.upuserip = upuserip;
    }

    @Column(name="upgamestatus", length=40)

    public String getUpgamestatus() {
        return this.upgamestatus;
    }

    public void setUpgamestatus(String upgamestatus) {
        this.upgamestatus = upgamestatus;
    }

    @Column(name="createtime", length=19)

    public Date getCreatetime() {
        return this.createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    @Column(name="successamount", precision=28, scale=5)

    public long getSuccessamount() {
        return this.successamount;
    }

    public void setSuccessamount(long successamount) {
        this.successamount = successamount;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="upgameRecharge")

    public Set<UpOrderLog> getUpOrderLogs() {
        return this.upOrderLogs;
    }

    public void setUpOrderLogs(Set<UpOrderLog> upOrderLogs) {
        this.upOrderLogs = upOrderLogs;
    }









}
